package com.ambulance.project.biz.controller.common;


import com.ambulance.framework.web.controller.BaseController;
import com.ambulance.framework.web.domain.AjaxResult;
import com.ambulance.project.biz.dto.PlatUserListDto;
import com.ambulance.project.biz.service.MyCustomerService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 人员信息 前端控制器
 * </p>
 *
 * @author zr
 * @since 2020-04-21
 */
@Api(tags = "多端共用-用户列表")
@RestController
@RequestMapping(value = "/treat/common/v1/plat", method = RequestMethod.POST)
public class PlatUserController extends BaseController {


    @Autowired
    private MyCustomerService myCustomerService;


    @ApiOperation(value = "用户信息", notes = "用户信息", produces = "application/json")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "用户标识", dataType = "array"),
    })
    @ApiResponses({
            @ApiResponse(code = 200, response = PlatUserListDto.class, message = "响应")
    })
    @RequestMapping(value = "/user/list/{ids}")
    public Object userList(@PathVariable Long[] ids) {
        startPage();
        List<PlatUserListDto> platUserListDto = myCustomerService.getPlatUserListDto(ids);
        return AjaxResult.success(platUserListDto);
    }


}
